<?php

namespace App\Traits;

trait ApiResponse
{
    protected static function success($data = [], $msg = "ok", $code = 200)
    {
        return api($data, $msg, $code);
    }

    protected static function failure($code = 500, $msg = "failure", $data = [])
    {
        return api($data, $msg, $code);
    }
}